import javax.microedition.midlet.*;

public class MTMMidlet extends MIDlet {
	static Class the_class;
	MTMCanvas canv;

	/**
	 *
	 */
	public MTMMidlet() {
		the_class = this.getClass();
		canv = new MTMCanvas(this);
	}

	/**
	 *
	 */
	public void startApp() {
		if (canv != null) {
			canv.start();
		}
	}

	public void pauseApp() {
		if (canv != null) {
			canv.hideNotify();
		}
	}

	/**
	 *
	 */
	public void destroyApp(boolean unconditional) throws MIDletStateChangeException {
		exitRequested();
	}

	/**
	 *
	 */
	public void exitRequested() {
		if (canv != null) {
			canv.stop();
		}
		notifyDestroyed();
	}
}
